the remove event, the script environment variable has disappeared, so we must
hook on the offline event instead. This fix was put into xen-backend.rules,
but not the vif scripts, so they were out of sync, and the interfaces were not
being properly closed down.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
ifconfig "$vif" up || fatal "ifconfig $vif up failed"
;;
- remove)
+ offline)
# vifs are auto-removed from bridge.
ifconfig "$vif" down || fatal "ifconfig $vif down failed"
;;
fi
case "$command" in
- add | offline)
+ add | remove)
exit 0
;;
esac
echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp
ipcmd='a'
;;
- remove)
+ offline)
ifconfig ${vif} down
ipcmd='d'
;;
echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp
ipcmd='a'
;;
- remove)
+ offline)
ifdown ${vif}
ipcmd='d'
;;